home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1998 November / maximum-cd-1998-11.iso / Truespace 4 / Data / PROGRAM / Scripts / constupdate.py < prev    next >
Encoding:
Text File  |  1998-08-27  |  791 b   |  15 lines

  1. # (c) 1998 Simon Windmill, simon@wfmm.com
  2. # windmill fraser multimedia, inc.  http://www.wfmm.com/
  3. #
  4. # This incredibly simple script keeps updating the scene.
  5. # Believe it or not, this serves a purpose: it allows you to see
  6. # how objects will move when you move a look-at TARGET instead of
  7. # waiting until anim playback or render time.
  8. # Assign this script to each object you wish to keep updating.
  9. def ontimechanged():
  10.   # we need to fool tS into thinking we changed this object, so we set
  11.   # its position with the same position. Uhh. You know what I mean.
  12.   me.Position = (me.Position[0], me.Position[1], me.Position[2])  
  13.   # Redraw the scene.  It'd be nice if we could just use me.Draw() to
  14.   # only redraw this object, but that just causes horrible flashing.
  15.   doc.Draw()